package com.xinqi.modules.databank.v2.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xinqi.common.mybatis.data.repo.SuperMapper;
import com.xinqi.modules.databank.dto.req.CourseResourceQuestionQueryDTO;
import com.xinqi.modules.databank.dto.rsp.QuizResultDTO;
import com.xinqi.modules.databank.v2.domain.CourseResourceQuestionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 互动课件切片提问表数据层
 *
 * @author: system
 * @date: 2023/03/15
 */
@Mapper
public interface CourseResourceQuestionMapper extends SuperMapper<CourseResourceQuestionEntity> {

    IPage<QuizResultDTO> selectQuiz(@Param("page") IPage<QuizResultDTO> page, @Param("queryDTO") CourseResourceQuestionQueryDTO queryDTO);

    IPage<QuizResultDTO> selectQuizByPid(IPage<QuizResultDTO> page, @Param("queryDTO") CourseResourceQuestionQueryDTO queryDTO);

    QuizResultDTO selectQuizById(@Param("id") Long id, @Param("classId") Long classId, @Param("userId") Long userId);

}
